/**
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import 'vars';

.outer {
  height: 100%;
  width: 100%;
  background: $border-light-grey;
  border-radius: 3px;
  overflow: hidden;

  &.is-complete {
    animation: htf-progress-bar-pulse 2s infinite;
  }
}

.inner-wrapper {
  height: 100%;
  left: -10px;
  position: relative;
  width: calc(100% + 20px);
}

.inner {
  background: rgba($theme-blue, .8);
  height: 100%;
  transition: width .4s ease;
  transform: skewX(-30deg);
}

.stripes {
  transform: skewX(45deg);
  height: 100%;
  width: 100%;
  background-image: linear-gradient(
    -45deg,
    rgba($theme-white, .08) 25%,
    transparent 25%,
    transparent 50%,
    rgba($theme-white, .08) 50%,
    rgba($theme-white, .08) 75%,
    transparent 75%,
    transparent
  );
  background-size: 50px 50px;
  animation: move 4s linear infinite;
}

@keyframes htf-progress-bar-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba($theme-blue, .25);
  }

  70% {
    box-shadow: 0 0 0 8px rgba($theme-blue, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba($theme-blue, 0);
  }
}

@keyframes move {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 50px 50px;
  }
}
